package com.ocm.core.dto;

import java.util.List;

import com.googlecode.simpleobjectassembler.annotation.EntityDto;

@EntityDto(id = "id")
public class ClassDefinitionDto {

   private Long id;

   private String name;

   private String displayName;

   private Integer classDefinitionType;

   private List<PropertyDefinitionDto> propertyDefs;

   private List<SecurityDto> securities;

   private String classDefUID;

   private ClassDefinitionDto parentClassDefUID;

   private String description;

   private StorageDto storage;

   public Long getId() {
      return id;
   }

   public void setId(Long id) {
      this.id = id;
   }

   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }

   public String getDisplayName() {
      return displayName;
   }

   public void setDisplayName(String displayName) {
      this.displayName = displayName;
   }

   public Integer getClassDefinitionType() {
      return classDefinitionType;
   }

   public void setClassDefinitionType(Integer classDefinitionType) {
      this.classDefinitionType = classDefinitionType;
   }

   public List<PropertyDefinitionDto> getPropertyDefs() {
      return propertyDefs;
   }

   public void setPropertyDefs(List<PropertyDefinitionDto> propertyDefs) {
      this.propertyDefs = propertyDefs;
   }

   public String getClassDefUID() {
      return classDefUID;
   }

   public void setClassDefUID(String classDefUID) {
      this.classDefUID = classDefUID;
   }

   public ClassDefinitionDto getParentClassDefUID() {
      return parentClassDefUID;
   }

   public void setParentClassDefUID(ClassDefinitionDto parentClassDefUID) {
      this.parentClassDefUID = parentClassDefUID;
   }

   public String getDescription() {
      return description;
   }

   public void setDescription(String description) {
      this.description = description;
   }

   public StorageDto getStorage() {
      return storage;
   }

   public void setStorage(StorageDto storage) {
      this.storage = storage;
   }

   public List<SecurityDto> getSecurities() {
      return securities;
   }

   public void setSecurities(List<SecurityDto> securities) {
      this.securities = securities;
   }

   @Override
   public boolean equals(Object obj) {
      ClassDefinitionDto classDefCompare = (ClassDefinitionDto) obj;
      if (this.getId().longValue() == classDefCompare.getId().longValue()) {
         return true;
      }
      return false;
   }
}
